package student;

import SQL.Student;

import java.sql.SQLException;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author: 保护小周
 * Date: 2022-11-15
 * Time: 9:54
 */
public class CustomerUse {


    private static void menu() {
        System.out.println();
        System.out.println("--------------学生信息界面--------------");
        System.out.println("**************************************");
        System.out.println("***** 1.查看学生信息  2.查看学生课表 *****");
        System.out.println("***** 3.学生成绩表    4.返校情况    *****");
        System.out.println("***** 5.修改学生信息  0-退出此界面   *****");
        System.out.println("**************************************");

        System.out.print("请选择修改内容：");
    }

    public static void function() throws SQLException, ClassNotFoundException {
        Scanner in = new Scanner(System.in);
        boolean flag = true;

        while( flag ) {
            menu(); //菜单
            System.out.println("请选择要执行的操作：");
            int size = in.nextInt();
            switch ( size ) {
                case 1:
                    StdFunction.function(); //学生表处理
                    break;
                case 2:
                    Schedule.Schedule(); //学生课表
                    break;
                case 3:
                    ScoreFunction.function(); //学生成绩表处理
                case 4:
                    break;
                case 5:
                    Student.modify(); //修改学生基本信息
                    break;
                case 0:
                    flag = false;
                    break;
                default:
                    System.out.println("错误输入！");
                    break;
            }
        }
    }
}
